﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using CarLoanSystem.Entity;

namespace CarLoanSystem
{
    public partial class frmMainAdmin : Form
    {
        private EmployeeItem empIte;
        public frmMainAdmin()
        {
            InitializeComponent();
            this.panelEmployee.Hide();
            this.panelCar.Hide();
            this.panelMain.Show();
            this.panelInterrest.Hide();
            this.panelDownPay.Hide();
            this.panelCarBarnd.Hide();
            this.panelCarModel.Hide();
            this.panelCusSaraly.Hide();
        }

        public frmMainAdmin(EmployeeItem item)
        {
            InitializeComponent();
            this.panelEmployee.Hide();
            this.panelCar.Hide();
            this.panelMain.Show();
            this.panelDownPay.Hide();
            this.panelInterrest.Hide();
            this.panelCarBarnd.Hide();
            this.panelCarModel.Hide();
            this.panelCusSaraly.Hide();
            empIte = item;
        }

        private void btnEmployee_Click(object sender, EventArgs e)
        {
            this.panelEmployee.Show();
            this.panelCar.Hide();
            this.panelMain.Hide();
            this.panelDownPay.Hide();
            this.panelInterrest.Hide();
            this.panelCarBarnd.Hide();
            this.panelCarModel.Hide();
            this.panelCusSaraly.Hide();
        }

        private void btnCar_Click(object sender, EventArgs e)
        {
            this.panelCar.Show();
            this.panelEmployee.Hide();
            this.panelMain.Hide();
            this.panelInterrest.Hide();
            this.panelDownPay.Hide();
            this.panelCarBarnd.Hide();
            this.panelCarModel.Hide();
            this.panelCusSaraly.Hide();
        }

        private void btnInterrest_Click(object sender, EventArgs e)
        {
            this.panelCar.Hide();
            this.panelEmployee.Hide();
            this.panelMain.Hide();
            this.panelDownPay.Hide();
            this.panelInterrest.Show();
            this.panelCarBarnd.Hide();
            this.panelCarModel.Hide();
            this.panelCusSaraly.Hide();
        }

        private void btnDownPay_Click(object sender, EventArgs e)
        {
            this.panelCar.Hide();
            this.panelEmployee.Hide();
            this.panelMain.Hide();
            this.panelInterrest.Hide();
            this.panelDownPay.Show();
            this.panelCarBarnd.Hide();
            this.panelCarModel.Hide();
            this.panelCusSaraly.Hide();
        }

        private void btnCherkPay_Click(object sender, EventArgs e)
        {
            this.panelCar.Hide();
            this.panelEmployee.Hide();
            this.panelInterrest.Hide();
            this.panelDownPay.Hide();
            this.panelCarBarnd.Hide();
            this.panelCarModel.Hide();
            this.panelCusSaraly.Hide();
            this.panelMain.Show();
            frmCheckPay frmCheckPay = new frmCheckPay();
            frmCheckPay.ShowDialog();
        }

        private void btnMain_Click(object sender, EventArgs e)
        {
            this.panelEmployee.Hide();
            this.panelCar.Hide();
            this.panelMain.Show();
            this.panelInterrest.Hide();
            this.panelDownPay.Hide();
            this.panelCarBarnd.Hide();
            this.panelCarModel.Hide();
            this.panelCusSaraly.Hide();
        }

        private void btnBrandCar_Click(object sender, EventArgs e)
        {
            this.panelEmployee.Hide();
            this.panelCar.Hide();
            this.panelMain.Hide();
            this.panelInterrest.Hide();
            this.panelDownPay.Hide();
            this.panelCarBarnd.Show();
            this.panelCarModel.Hide();
            this.panelCusSaraly.Hide();
        }

        private void btnModelCar_Click(object sender, EventArgs e)
        {
            this.panelEmployee.Hide();
            this.panelCar.Hide();
            this.panelMain.Hide();
            this.panelInterrest.Hide();
            this.panelDownPay.Hide();
            this.panelCarBarnd.Hide();
            this.panelCarModel.Show();
            this.panelCusSaraly.Hide();
        }

        private void btnAppoint_Click(object sender, EventArgs e)
        {
            this.panelCar.Hide();
            this.panelEmployee.Hide();
            this.panelInterrest.Hide();
            this.panelDownPay.Hide();
            this.panelCarBarnd.Hide();
            this.panelCusSaraly.Hide();
            this.panelCarModel.Hide();
            this.panelMain.Show();
            frmCheckAppoint frmCheckAppoint = new frmCheckAppoint();
            frmCheckAppoint.ShowDialog();
        }

        private void btnCus_Click(object sender, EventArgs e)
        {
            this.panelCar.Hide();
            this.panelEmployee.Hide();
            this.panelInterrest.Hide();
            this.panelDownPay.Hide();
            this.panelCarBarnd.Hide();
            this.panelCarModel.Hide();
            this.panelMain.Hide();
            this.panelCusSaraly.Show();
        }
     }
}
